﻿#include<iostream>
using namespace std;

int main() {
	int asize;
	cout << "元素个数：";
	cin >> asize;

	int* a = new int[asize];

	for (int i = 0; i < asize; i++) {
		a[i] = i;
	}

	for (int i = 0; i < asize; i++) {
		cout << "a[" << i << "]=" << a[i] << '\n';
	}

	delete[] a;

	cin.get();
	cin.get();
}